import { ICoreApp, ICoreAppType } from '@/types/core/app'
import { ICoreHash } from '@/types/core/hash'

// 应用类型
export const appTypeOptions: {
    label: string
    value: ICoreAppType
    theme: 'error' | 'info' | 'success' | 'warning'
}[] = [
    {
        label: 'App',
        value: 'app',
        theme: 'info'
    },
    {
        label: '网页',
        value: 'web',
        theme: 'error'
    },
    {
        label: '小程序',
        value: 'wechat',
        theme: 'success'
    },
    {
        label: '服务器',
        value: 'server',
        theme: 'warning'
    }
]

export const appStateOptions: {
    label: string
    value: ICoreApp['state']
    theme: 'success' | 'default'
}[] = [
    {
        label: '正常',
        value: 1,
        theme: 'success'
    },
    {
        label: '停用',
        value: 0,
        theme: 'default'
    }
]

export const hashStateOptions: {
    label: string
    value: ICoreHash['state']
    theme: 'success' | 'default'
}[] = [
    {
        label: '正常',
        value: 1,
        theme: 'success'
    },
    {
        label: '停用',
        value: 0,
        theme: 'default'
    }
]

export const hashMethodOptions: {
    label: string
    value: ICoreHash['method']
    theme: 'success' | 'default'
}[] = [
    {
        label: 'GET',
        value: 'GET',
        theme: 'success'
    },
    {
        label: 'POST',
        value: 'POST',
        theme: 'default'
    }
]

export const hashNeedSystemOptions: {
    label: string
    value: ICoreHash['need_system']
    theme: 'success' | 'default'
}[] = [
    {
        label: '验证',
        value: 1,
        theme: 'success'
    },
    {
        label: '放行',
        value: 0,
        theme: 'default'
    }
]

export const hashNeedLoginOptions: {
    label: string
    value: ICoreHash['need_login']
    theme: 'success' | 'default'
}[] = [
    {
        label: '验证',
        value: 1,
        theme: 'success'
    },
    {
        label: '放行',
        value: 0,
        theme: 'default'
    }
]

export const hashNeedLogOptions: {
    label: string
    value: ICoreHash['need_log']
    theme: 'success' | 'default'
}[] = [
    {
        label: '记录',
        value: 1,
        theme: 'success'
    },
    {
        label: '不记录',
        value: 0,
        theme: 'default'
    }
]
